import numpy as np
import SimpleITK as sitk

t1_path=r"C:\Users\AMYGDALA\Desktop\web_main\main\PredictTCL_main\WANG_XU_bboxes\t1_bbox.npz.npy"
nii = r"C:\Users\AMYGDALA\Desktop\web_main\main\PredictTCL_main\nii_samples\PN0006132-ZHOU_XIU_YING\t1_bbox.nii.gz"


t1=np.load(t1_path)
t1 = np.expand_dims(t1, axis=0)
def get_image(path):
    img = sitk.ReadImage(path)
    img = sitk.GetArrayFromImage(img)
    img = img.transpose((1, 2, 0)).astype(float)
    img = np.clip(img, 0, 1200)
    img = np.expand_dims(img, axis=0)
    return img

img=get_image(nii)


print(t1.shape)
print(img.shape)
